import Vue from 'vue'
import VueRouter from 'vue-router'
import jiazai from '../views/jiazai.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'jiazai',
    component: jiazai
  },
  {
    path: '/zhuyemian',
    name: 'zhuyemian',
    // route level code-splitting
    // this generates a separate chunk (zhuyemian.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/zhuyemian.vue'),
    children:[
      {
        path:'',
        name:'userlist',
        component:() => import( '../views/sy_ly.vue'),
        meta:[]
      },
      {
        path:'/sy_ly',
        name:'userlist',
        component:() => import( '../views/sy_ly.vue'),
        meta:[]
      },
      {
        path:'/y1',
        name:'userlist',
        component:() => import( '../views/y1.vue'),
        meta:['数据管理','y1']
      },
      {
        path:'/y2',
        name:'userlist',
        component:() => import( '../views/y2.vue')
        ,meta:['数据管理','y2']
      },
      {
        path:'/y3',
        name:'userlist',
        component:() => import( '../views/y3.vue')
        ,meta:['数据管理','y3']
      },
      {
        path:'/y4',
        name:'userlist',
        component:() => import( '../views/y4.vue')
        ,meta:['数据管理','y4']
      },
      {
        path:'/y5',
        name:'userlist',
        component:() => import( '../views/y5.vue')
        ,meta:['数据管理','y5']
      },
      {
        path:'/yy1',
        name:'userlist',
        component:() => import( '../views/yy1.vue')
        ,meta:['添加管理','yy1']
      },
      {
        path:'/yy2',
        name:'userlist',
        component:() => import( '../views/yy2.vue')
        ,meta:['添加管','yy2']
      },
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
